package com.example.springbootdemo.query;

<#list table.importPackages as pkg>
 import ${pkg};
</#list>
import ${package.Entity}.${entity}Entity;
import java.util.Date;
<#if swagger2>
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
</#if>
<#if entityLombokModel>
 import lombok.Data;
 import lombok.EqualsAndHashCode;
</#if>

/**
* <p>
* ${table.comment!} 包装类
* </p>
*
* @author ${author}
* @since ${date}
*/
<#if entityLombokModel>
@Data
 <#if superEntityClass??>
@EqualsAndHashCode(callSuper = true)
 <#else>
@EqualsAndHashCode(callSuper = false)
 </#if>
</#if>
<#--<#if table.convert>-->
<#-- @TableName("${table.name}")-->
<#--</#if>-->
<#if swagger2>
@ApiModel(value="${entity}Query对象", description="${table.comment!}")
</#if>
public class ${entity}Query extends ${entity}Entity {


<#if !entityLombokModel>
 <#list table.fields as field>
  <#if field.propertyType == "boolean">
   <#assign getprefix="is"/>
  <#else>
   <#assign getprefix="get"/>
  </#if>
  public ${field.propertyType} ${getprefix}${field.capitalName}() {
  return ${field.propertyName};
  }

  <#if entityBuilderModel>
   public ${entity} set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
  <#else>
   public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
  </#if>
  this.${field.propertyName} = ${field.propertyName};
  <#if entityBuilderModel>
   return this;
  </#if>
  }
 </#list>
</#if>

<#if activeRecord>
 @Override
 protected Serializable pkVal() {
 <#if keyPropertyName??>
  return this.${keyPropertyName};
 <#else>
  return null;
 </#if>
 }

</#if>
<#if !entityLombokModel>
 @Override
 public String toString() {
 return "${entity}{" +
 <#list table.fields as field>
  <#if field_index==0>
   "${field.propertyName}=" + ${field.propertyName} +
  <#else>
   ", ${field.propertyName}=" + ${field.propertyName} +
  </#if>
 </#list>
 "}";
 }
</#if>
}
